package com.windgo.controller.wx;

import com.windgo.bean.bo.wxhomebo.WxHomeBo;
import com.windgo.bean.common.BaseRespVo;
import com.windgo.bean.vo.WxHomeAboutVO;
import com.windgo.service.WxHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wuwen
 * @since 2022/10/15
 * 16:52
 */
@RestController
@RequestMapping("wx/home")
public class WxHomeController {
   @Autowired
    WxHomeService wxHomeService;

   @RequestMapping("index")
   public BaseRespVo index(){
       WxHomeBo data = wxHomeService.search();
       return BaseRespVo.ok(data);
   }

   @RequestMapping("about")
    public BaseRespVo<WxHomeAboutVO> aboutHome(){
       WxHomeAboutVO wxHomeAboutVO = wxHomeService.aboutHome();
       return BaseRespVo.ok(wxHomeAboutVO);
   }
}

